﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="BannerManager.ascx.cs"
    Inherits="BannerManager" %>
<div class="MainFilter">
    <span class="headertext">Trang hiển thị:</span>
    <asp:DropDownList ID="cmbViTri" runat="server" Width="137px" AutoPostBack="True"
        OnSelectedIndexChanged="cmbViTri_SelectedIndexChanged">
        <asp:ListItem Selected="True" Value="0">--Tất cả--</asp:ListItem>
        <asp:ListItem Text="Top banner" Value="TopBanner"></asp:ListItem>        
    </asp:DropDownList>
</div>
<asp:GridView ID="grvBanner" runat="server" AutoGenerateColumns="False" AllowPaging="True"
    Font-Size="Small" CssClass="adminlist" OnRowDataBound="grvBanner_RowDataBound"
    OnPageIndexChanging="grvBanner_PageIndexChanging">
    <Columns>
        <asp:TemplateField HeaderText="X&#243;a" ItemStyle-Width="20px">
            <HeaderTemplate>
                <input id="chkAll" onclick="javascript:SelectAllCheckboxes(this);" type="checkbox" />
            </HeaderTemplate>
            <ItemTemplate>
                <input runat="server" id="chkSelect" value='<%# "?mod=" +  WebComponents.ConvertType.Encode(this.AddModule) + "&id=" + Eval("AdsId") %>'
                    type="checkbox" title='<%# Eval("AdsId") %>' />
            </ItemTemplate>
            <ItemStyle HorizontalAlign="Center" Width="20px" />
            <HeaderStyle Width="20px" />
        </asp:TemplateField>
        <asp:TemplateField HeaderText="ID">
            <ItemTemplate>
                <asp:Label ID="lblFileID" runat="server" Text='<%# Eval("AdsId") %>'></asp:Label>
            </ItemTemplate>
            <HeaderStyle Width="40px" />
            <ItemStyle HorizontalAlign="Center" />
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Ti&#234;u đề">
            <ItemTemplate>
                <a href='?&mod=<%=WebComponents.ConvertType.Encode(this.AddModule) %>&id=<%# Eval("AdsId")  %>'>
                    <asp:Label ID="lblTitle" runat="server" Text='<%# Eval("AdvTitle") %>'></asp:Label>
                </a>
            </ItemTemplate>
            <HeaderStyle HorizontalAlign="Left" />
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Media">
            <ItemTemplate>
                <a href='?&mod=<%=WebComponents.ConvertType.Encode(this.AddModule) %>&id=<%# Eval("AdsId")  %>'>
                    <asp:Label ID="lblMedia" runat="server"></asp:Label></a>
            </ItemTemplate>
            <HeaderStyle HorizontalAlign="Left" Width="120" />
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Chiều cao">
            <ItemTemplate>
                <asp:Label ID="lblTitle2" runat="server" Text='<%# Eval("Height") %>'></asp:Label>px
            </ItemTemplate>
            <HeaderStyle Width="70px" HorizontalAlign="Center" />
            <ItemStyle HorizontalAlign="Center" />
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Chiều rộng">
            <ItemTemplate>
                <asp:Label ID="lblTitle4" runat="server" Text='<%# Eval("Width") %>'></asp:Label>px
            </ItemTemplate>
            <HeaderStyle Width="80px" HorizontalAlign="Center" />
            <ItemStyle HorizontalAlign="Center" />
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Trạng th&#225;i">
            <ItemTemplate>
                <a href="#" onclick="SubmitTask(<%# Eval("AdsId")  %>,'changestatus')" class="<%# (Eval("Status").ToString()=="1")? "item-publish": "item-unpublish" %>"
                    title="<%# (Eval("Status").ToString()=="1")? "Ẩn": "Hiển thị" %>"></a>
            </ItemTemplate>
            <ItemStyle HorizontalAlign="Center" />
            <HeaderStyle Width="70px" />
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Trang hiển thị">
            <ItemTemplate>
                <asp:Label ID="lblaaa" runat="server" Text='<%# Eval("Position") %>'></asp:Label>
            </ItemTemplate>
            <ItemStyle HorizontalAlign="Center" />
            <HeaderStyle Width="100px" />
        </asp:TemplateField>
        <%--<asp:TemplateField HeaderText="Vị trí">
            <HeaderTemplate>
                Vị trí
               <a href="#" class="item-saveorder"></a>
            </HeaderTemplate>
            <ItemTemplate>
                <asp:Label ID="lblthutu" runat="server" Text='<%# Eval("OrderId") %>'></asp:Label>
               <a href="#" class="item-moveup" title=""></a><a href="#" class="item-movedown" title="">
                </a>
                <asp:TextBox ID="txtOrder" runat="server" Text='<%# Eval("OrderId") %>' Width="20px"
                    Style="text-align: right;"></asp:TextBox>
            </ItemTemplate>
            <ItemStyle HorizontalAlign="Center" />
            <HeaderStyle Width="70px" />
        </asp:TemplateField>--%>
    </Columns>
    <EmptyDataTemplate>
        <div align="center" id="EmptyData">
            Không có thông tin...</div>
    </EmptyDataTemplate>
    <PagerStyle HorizontalAlign="Center" CssClass="pager" />
</asp:GridView>
